package cn.crm.bean;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * InOutLog entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "IOL_INOUTLOG")
public class InOutLog implements java.io.Serializable {

	// Fields

	private String iolPsid;
	private Customer customer;
	private User user;
	private Boolean iolInouttype;
	private Date iolLogtime;
	private Integer iolBycount;
	private Double iolDivmoney;
	private Boolean iolIsreceivables;
	private Boolean iolIsdelete;
	private Product product;

	// Constructors

	/** default constructor */
	public InOutLog() {
	}

	/** minimal constructor */
	public InOutLog(String iolPsid, User user) {
		this.iolPsid = iolPsid;
		this.user = user;
	}

	/** full constructor */
	public InOutLog(String iolPsid, Customer customer, User user,
			Boolean iolInouttype, Date iolLogtime, Integer iolBycount,
			Double iolDivmoney, Boolean iolIsreceivables, Boolean iolIsdelete) {
		this.iolPsid = iolPsid;
		this.customer = customer;
		this.user = user;
		this.iolInouttype = iolInouttype;
		this.iolLogtime = iolLogtime;
		this.iolBycount = iolBycount;
		this.iolDivmoney = iolDivmoney;
		this.iolIsreceivables = iolIsreceivables;
		this.iolIsdelete = iolIsdelete;
	}

	// Property accessors
	@Id
	@Column(name = "IOL_PSID", unique = true, nullable = false, length = 36)
	public String getIolPsid() {
		return this.iolPsid;
	}

	public void setIolPsid(String iolPsid) {
		this.iolPsid = iolPsid;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CUST_CUSTID")
	public Customer getCustomer() {
		return this.customer;
	}

	public void setCustomer(Customer customer) {
		this.customer = customer;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "US_EMPID", nullable = false)
	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Column(name = "IOL_INOUTTYPE", precision = 1, scale = 0)
	public Boolean getIolInouttype() {
		return this.iolInouttype;
	}

	public void setIolInouttype(Boolean iolInouttype) {
		this.iolInouttype = iolInouttype;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "IOL_LOGTIME", length = 7)
	public Date getIolLogtime() {
		return this.iolLogtime;
	}

	public void setIolLogtime(Date iolLogtime) {
		this.iolLogtime = iolLogtime;
	}

	@Column(name = "IOL_BYCOUNT", precision = 8, scale = 0)
	public Integer getIolBycount() {
		return this.iolBycount;
	}

	public void setIolBycount(Integer iolBycount) {
		this.iolBycount = iolBycount;
	}

	@Column(name = "IOL_DIVMONEY", precision = 8)
	public Double getIolDivmoney() {
		return this.iolDivmoney;
	}

	public void setIolDivmoney(Double iolDivmoney) {
		this.iolDivmoney = iolDivmoney;
	}

	@Column(name = "IOL_ISRECEIVABLES", precision = 1, scale = 0)
	public Boolean getIolIsreceivables() {
		return this.iolIsreceivables;
	}

	public void setIolIsreceivables(Boolean iolIsreceivables) {
		this.iolIsreceivables = iolIsreceivables;
	}

	@Column(name = "IOL_ISDELETE", precision = 1, scale = 0)
	public Boolean getIolIsdelete() {
		return this.iolIsdelete;
	}

	public void setIolIsdelete(Boolean iolIsdelete) {
		this.iolIsdelete = iolIsdelete;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "pid")
	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}
	
	

}